package cn.kgc.service;

import cn.kgc.dao.UserDao;
import cn.kgc.dao.UserDaoImpl;
import cn.kgc.entity.Usr;

/**
 * @author mosin
 * date 2022/2/11
 * @version 1.0
 * 用户的业务处理层
 */
public class UserServiceImpl implements  UserService {

    private UserDao userDao = new UserDaoImpl();
    //用户的登陆
    public Boolean login(Usr usr){
        Usr  user= userDao.login(usr);
        return  user!=null;
    }


    //用户的注册
    public Boolean register(Usr usr){
        int line = userDao.register(usr);
        return  line>0;
    }

}
